<!DOCTYPE html>
<html lang="zh-cmn-Hans">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<title>鹿程智慧油站商户平台</title>
		<meta name="description" content="鹿程科技是提供加油站互联网化零管系统、营销及支付和大数据分析运营服务的行业领先科技公司。鹿程科技充分了解加油站行业的需求和新兴互联网的发展,依靠业内最先进的科技和标准化的运营,持续帮助油站业务发展创造价值。"/>
		<meta name="keywords" content="智慧油站,鹿程,鹿程智慧油站,鹿程智慧油站微信支付,加油站微信支付,加油站营销管理"/>
		<link rel="icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
		<link rel="shortcut icon" href="https://static.zhihuiyouzhan.com.cn/static/styles/admin/img/title.ico" type="image/x-icon">
		<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
		<link rel="stylesheet" href="../layui/css/layui.css" />
		<link rel="stylesheet" href="../css/style.css" />
	</head>
<body>
	
	<form class="layui-form order-form" action="#">
		<dl>
			<dt>请选择班次</dt>
			<dd>
				<select name="class_id" lay-filter="ware-cate" id="classes" lay-verify="classes">
			        <option value="">请选择班次</option>
			        <option value="0">1</option>
			        <option value="1">2</option>
			        <option value="2">3</option>
		      	</select>
			</dd>
		</dl>
		<dl>
			<dt>优先选择</dt>
			<p>
				<input type="checkbox" name="lucheng1" title="鹿程001">
		      	<input type="checkbox" name="lucheng2" title="鹿程002">
		      	<input type="checkbox" name="lucheng3" title="鹿程003">
		      	<input type="checkbox" name="lucheng4" title="鹿程004">
			</p>
		</dl>
		<dl>
			<dt>加油员</dt>
			<p>
		      	<input type="checkbox" name="lucheng5" title="鹿程005">
		      	<input type="checkbox" name="lucheng6" title="鹿程006">
		      	<input type="checkbox" name="lucheng7" title="鹿程007">
		      	<input type="checkbox" name="lucheng8" title="鹿程008">
		      	<input type="checkbox" name="lucheng9" title="鹿程009">
		      	<input type="checkbox" name="lucheng10" title="鹿程0010">
		      	<input type="checkbox" name="lucheng11" title="鹿程0011">
			</p>
		</dl>
		<dl>
			<dt></dt>
			<p><button class="deer-btn" lay-submit lay-filter="Submit" lay-verify="checkboxs">确定</button>
			</p>
		</dl>
	</form>
	
	
	
	<script type="text/javascript" src="../layui/layui.js" ></script>
	<script type="text/javascript">
		layui.use(['form','jquery'],function(){
			var   form=layui.form;
			var   $=layui.jquery;
			
			
			form.verify({
				classes:function(){
					var val=$('#classes').val();
					if(val==""){
						return '您尚未选择班次'
					}
				},
				checkboxs:function(){
					if($('.order-form>dl>p>div').hasClass('layui-form-checked')){
						return false
					}else{
						return '您尚未选择加油员'
					}
				}
				
		 	})
				
			
			form.on('submit(Submit)', function(data){
					console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
					$.ajax({
			            url: '/',
			            data: data.field,
			            type: 'post',
			            datatype: 'json',
			            success: function (res) {
			                if (res.code == 1) {
			                	
			                	layer.msg(res.msg);
			                    return;
			                }
				            }
				        });
				    window.parent.location.reload() //提交关闭
					return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
				})
			
			
			
			
		})
		
		
		
	</script>
	
	
	
	
	
	
	
	
	
	
	
</body>
</html>